package org.example.myleet.Utils;

public class ArrayUtils {

    /**
     * 翻转nums数组，翻转范围包括start、包括end
     */
    public static void reverse(int[] nums, int start, int end) {
        int i = start, j = end;
        while (i < j) {
            int t = nums[i];
            nums[i] = nums[j];
            nums[j] = t;
            ++i;
            --j;
        }
    }
}
